package rhc.taskSchedule.taskSchedule;

import rhc.taskSchedule.entity.RunningStatus;

public interface BasicInterface {

	/**获取运行id
	 * @return
	 * @throws Exception
	 */
	String getId() throws Exception;
	
	/**获取源id，任务id或调度id
	 * @return
	 * @throws Exception
	 */
	String getSourceId() throws Exception;
	
	/**开始运行
	 * @throws Exception
	 */
	void run() throws Exception;
	
	/**停止运行
	 * @throws Exception
	 */
	void stop() throws Exception;
	
	/**暂停运行
	 * @throws Exception
	 */
	void pause() throws Exception;
	
	/**恢复运行
	 * @throws Exception
	 */
	void regain() throws Exception;
	
	/**运行错误
	 * @throws Exception
	 */
	void error() throws Exception;
	
	/**获取运行状态
	 * @return
	 * @throws Exception
	 */
	RunningStatus getRunStatus() throws Exception;
}
